package com.elevator;

import java.awt.Color;
import java.awt.Graphics;

import javax.swing.JLabel;
import javax.swing.JPanel;

public class personUI extends JPanel {
    private static final long serialVersionUID = 1L;
    public String mPersionIdString ="1234";
	public int mPersionId = 0;
	public int mToLayerId = -1;
	public JLabel mLabel = new JLabel();
	public personUI() {
		this.setSize(50,50);
		this.setLayout(null);
		this.add(mLabel);
		mLabel.setBounds(0, 0, 50, 20);
		mLabel.setText("P1 To 2");
		
	}
	public void setText(int nid,int nlayer) {
		String strLayer = "";
		if (nlayer == 0) {
			strLayer = "G";
		}
		else{
			strLayer = ""+nlayer;
		}
		mLabel.setText("P"+nid+" To "+strLayer);
	}
	@Override
	public void paint(Graphics g) {
		// TODO Auto-generated method stu
		super.paint(g);
		
		g.setColor(Color.blue);
		g.drawRoundRect(5, 5, 15, 15, 15, 15);
		g.drawLine(13, 20, 30, 35);
		g.drawLine(13, 20, 0, 35);
		g.drawLine(8, 29, 8, 50);
		g.drawLine(18, 29, 18, 50);
		g.dispose();
		
	}
}
